package com.a2v2.online.store.database.entity;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "user_session")
public class UserSession extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8005180949019628218L;
	/**
	 * 
	 */
	@Column(name = "session_id")
	private String sessionId;
	/**
	 * 
	 */
	@Column(name = "ip_address")
	private String ipAddress;
	/**
	 * 
	 */
	@Column(name = "login_ts")
	private Timestamp loggedIn;
	/**
	 * 
	 */
	@Column(name = "logout_ts")
	private Timestamp logOut;
	/**
	 * 
	 */
	@Column(name = "abnormal_session")
	private boolean abnormalSession;
	/**
	 * 
	 */
	@Column(name = "user_credential_id")
	private Long userCredentialId;

	/**
	 * @return the sessionId
	 */
	public String getSessionId() {
		return sessionId;
	}

	/**
	 * @param sessionId
	 *            the sessionId to set
	 */
	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	/**
	 * @return the ipAddress
	 */
	public String getIpAddress() {
		return ipAddress;
	}

	/**
	 * @param ipAddress
	 *            the ipAddress to set
	 */
	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	/**
	 * @return the loggedIn
	 */
	public Timestamp getLoggedIn() {
		return loggedIn;
	}

	/**
	 * @param loggedIn
	 *            the loggedIn to set
	 */
	public void setLoggedIn(Timestamp loggedIn) {
		this.loggedIn = loggedIn;
	}

	/**
	 * @return the logOut
	 */
	public Timestamp getLogOut() {
		return logOut;
	}

	/**
	 * @param logOut
	 *            the logOut to set
	 */
	public void setLogOut(Timestamp logOut) {
		this.logOut = logOut;
	}

	/**
	 * @return the abnormalSession
	 */
	public boolean isAbnormalSession() {
		return abnormalSession;
	}

	/**
	 * @param abnormalSession
	 *            the abnormalSession to set
	 */
	public void setAbnormalSession(boolean abnormalSession) {
		this.abnormalSession = abnormalSession;
	}

	/**
	 * @return the userCredentialId
	 */
	public Long getUserCredentialId() {
		return userCredentialId;
	}

	/**
	 * @param userCredentialId
	 *            the userCredentialId to set
	 */
	public void setUserCredentialId(Long userCredentialId) {
		this.userCredentialId = userCredentialId;
	}

	/**
     * Gets the current value of id.
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * Sets the value of id.
     * @param pId new value to be set.
     */
    public void setId(final Long pId) {
        this.id = pId;
    }
}
